package com.gitee.cui.netty.decoder;

import com.gitee.cui.util.Logger;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

/**
 * 整数入站处理器，将上一站传递的数据，处理成整数，并打印到控制台上
 * @author cuiqingqiang
 * @version 1.0
 * @date 2021/10/22 16:56
 **/
public class IntegerProcessHandler extends ChannelInboundHandlerAdapter {
    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        Integer value = (Integer) msg;
        Logger.info("打印一个整数：" + value);
    }
}
